<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>sys-shim page</title>
    <script type="text/javascript"></script>
    <script src="https://cdn.jsdelivr.net/npm/rpc-websockets@7.6.0/dist/index.browser-bundle.js"></script>
  </head>
  <script>
    ;(async () => {
        window.hwnd = await window.ext.hwnd
        window.ws = new RPCWebSocket.Client(await window.ext.wsUrl)
        window.main = await new Sys(ws)
        await ws.call(`forms.callFn`, [`${hwnd}.show`])
        await ws.call(`view.setIcon`, [hwnd, `https://www.baidu.com/favicon.ico`])
    })()
  </script>
  <body>
    <button onclick="main.msgBox(`hello`, `title`)">msgBox</button>
    <button onclick="main.exit()">exit</button>
  </body>
</html>
